//
//  AQBasicFactory.m
//  RunLoopDemo
//
//  Created by zhangjikuan on 2020/8/27.
//  Copyright © 2020 hsgd. All rights reserved.
//

#import "AQBasicFactory.h"
#import "AQTaskCopyAndStrong.h"
#import "AQTaskDefine.h"
#import "EcodeTask.h"

@implementation AQBasicFactory
+ (AQTask *)taskWith:(AQTaskType)taskType {
    switch (taskType) {
        case AQTaskTypeCopyAndStrong:
            return [[AQTaskCopyAndStrong alloc] init];
            break;
        case AQTaskTypeBlock:
            return [[AQTaskBlock alloc] init];
            break;
        case AQTaskTypeThread:
            return [[AQTaskThread alloc] init];
            break;
        case AQJSOCTypeTask:
            return [[AQJSOCTask alloc] init];
            break;
        case AQEcodeTypeTask:
            return [[EcodeTask alloc] init];
            break;
        default:
            
            break;
    }
    
    return [AQTask new];
}
@end
